<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>浮动</title>
</head>
<style>
    .father{
        /* height: 300px;  */
        background-color: cornsilk;
        border: 3px dotted yellowgreen;
        overflow: hidden;
    }
    .right-son{
        width: 100px;
        height: 100px;
        background-color: rgb(234, 16, 16);
        float: right;
    }
    .left-son{
        width: 100px;
        height: 100px;
        background-color: darkorange;
        float: left;
    }
</style>


<body>
    <div class="father">  
        <div class="right-son">这是一个右浮动</div>
        <div class="left-son">这是一个左浮动</div>
    </div>
    <p>yiduanwenben</p>

</body>
</html>